import java.util.HashSet;
import java.util.Set;

public class Solution575 {
    public int distributeCandies(int[] candyType) {
        Set set=new HashSet<>();
        for (int i : candyType) {
            set.add(i);
        }
        return Math.min(candyType.length/2,set.size());
    }

    public static void main(String[] args) {
        System.out.println(new Solution575().distributeCandies(new int[]{1,1,2,2,3,3}));
    }
}

